package com.ykq.system.controller;

import com.ykq.system.service.IRoleService;
import com.ykq.system.vo.CommonResult;
import com.ykq.system.vo.RoleVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 闫克起
 * @since 2022-08-08
 */
@RestController
@RequestMapping("/system/role")
public class RoleController {

    @Autowired
    private IRoleService roleService;
    //PathVariable获取{}中变量得直
    @PostMapping("findRole/{currentPage}/{pageSize}")
    public CommonResult findRole(@PathVariable Integer currentPage, @PathVariable Integer pageSize, @RequestBody RoleVo roleVo){
        return  roleService.selectRole(currentPage,pageSize,roleVo);
    }
}
